/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package com;

import java.awt.Font;
import java.awt.GridBagConstraints;
import java.awt.GridBagLayout;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import java.net.URL;
import javax.swing.*;
import javax.swing.text.SimpleAttributeSet;
import javax.swing.text.StyleConstants;

/**
 *
 * @author alrz
 */
public class About extends JPanel
{
    public About()
    {
        super();
        this.setLayout(new GridBagLayout());
        GridBagConstraints gbc = new GridBagConstraints();
        gbc.fill = GridBagConstraints.CENTER;
        JLabel img = new JLabel();
        String path = "Icons/gnotravex-logo.png";  
        URL url = this.getClass().getResource(path);  
        ImageIcon icon = new ImageIcon(url);
        img.setIcon(icon);
        gbc.gridx = 0;
        gbc.gridy = 0;
        this.add(img, gbc);
        
        JLabel title = new JLabel("Tetravex", JLabel.CENTER);
        title.setFont(new Font("Helvetica", Font.BOLD, 30));
        gbc.gridx = 0;
        gbc.gridy = 1;
        this.add(title, gbc);
        
        JTextPane jta = new JTextPane();
        SimpleAttributeSet attribs = new SimpleAttributeSet();  
        StyleConstants.setAlignment(attribs , StyleConstants.ALIGN_CENTER);  
        jta.setParagraphAttributes(attribs,true); 
        jta.setText("Tetravex es un puzle sencillo en el que las piezas\n se debe colocar de modo que los mismos números se toquen.");
        jta.setEditable(false);
        jta.setBackground(null);
        gbc.gridx = 0;
        gbc.gridy = 2;
        this.add(jta, gbc);
       
        JTextPane jtp = new JTextPane();
        StyleConstants.setAlignment(attribs , StyleConstants.ALIGN_CENTER);  
        jtp.setParagraphAttributes(attribs,true); 
        jtp.setText("Copyright © 2012 \nMauricio Orellana\nAlex Munoz");
        jtp.setEditable(false);
        jtp.setBackground(null);
        gbc.gridx = 0;
        gbc.gridy = 3;
        this.add(jtp, gbc);  
    }
}
